home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 001_015 / 015c / Text
Encoding:
Text File  |  1994-03-15  |  17.3 KB  |  461 lines

  1. -----------------------------------------------------------------------------
  2. 7th July 1992
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note
  5. Number: 015
  6. Issue: 2
  7. Author:
  8. -----------------------------------------------------------------------------
  9.  
  10. Acorn Electron Expansion Application Note
  11.  
  12. -----------------------------------------------------------------------------
  13. Applicable Hardware: Acorn Electron
  14.  
  15. Related Application Notes:
  16.  
  17.  
  18. -----------------------------------------------------------------------------
  19. Copyright (C) Acorn Computers Limited 1992
  20.  
  21. Every effort has been made to ensure that the information in this leaflet is 
  22. true and correct at the time of printing. However, the products described in
  23. this leaflet are subject to continuous development and improvements and
  24. Acorn Computers Limited reserves the right to change its specifications at
  25. any time. Acorn Computers Limited cannot accept liability for any loss or
  26. damage arising from the use of any information or particulars in this
  27. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  28. Limited.
  29. -----------------------------------------------------------------------------
  30. Support Group
  31. Acorn Computers Limited
  32. Acorn House
  33. Vision Park
  34. Histon
  35. Cambridge       CB4 4AE
  36. -----------------------------------------------------------------------------
  37.  
  38. The information contained in this application note is provided as a guide to developers of expansion modules for the Acorn Electron.
  39.  
  40.  
  41. 1.0  Purpose of this application note
  42.  
  43. 1  To describe the signals available on the expansion port at the rear of
  44. the Electron microcomputer.
  45.  
  46. 2  To define the specification which all expansion modules for the Electron
  47. microcomputer must meet.
  48.  
  49. 3  To describe Acorn Computers' philosophy for expansion of the Electron
  50. microcomputer.
  51.  
  52. Note that both hardware and software must conform to the standards set out
  53. in this note.  Failure to do this will result in poor reliability, and
  54. incompatibility with other expansion modules and the Electron itself. 
  55. Failure to comply with the power supply requirements may cause the thermal
  56. fuse in the mains power adaptor to blow irretrievably.
  57.  
  58.  
  59. 1.1  Acorn Expansion Module Philosophy
  60.  
  61. The Electron is designed to take one or two expansion units fixed rigidly to
  62. the main unit and to one another by screws which locate into recessed brass
  63. bosses.  More expansion units can be added with consequent loss of rigidity.
  64.  
  65. Electrical connection is to the PCB edge connector at the back of the
  66. Electron.  Dimensions and specifications for the expansion connector are
  67. given in section 2 and the Appendix.
  68.  
  69.  
  70. 2.0  Electron Expansion Connector
  71.  
  72. Pinout
  73.  
  74. To gain access to the Electron expansion connector, the plastic cover which
  75. protects it must be removed.  Any  instructions supplied with an expansion
  76. module must direct the user to remove this cover before attempting to
  77. connect the module to the Electron, and to replace the cover whenever the
  78. module is disconnected.
  79.  
  80. The Electron expansion connector is laid out as shown in Figure 1. 
  81.  
  82.  
  83.  
  84. 2.1  Signal Definitions
  85.  
  86. The function of each terminal on the Electron expansion connector is
  87. described below.
  88.  
  89. 18V AC (pins 1,2)       These lines are connected directly to the output
  90. AC RETURNS (pins 3,4)   from the Electron mains power 
  91.                         adaptor.  A total of 6W may be drawn from these
  92.                         lines as long as no power is
  93.                         taken from +5V (pins 9,10,49,50).  For safety
  94.                         reasons these lines must never
  95.                         be used as an AC input to the Electron, see Section 
  96.                         3.
  97.  
  98. -5V (pins 5,6)          A -5V supply from the Electron.  Up to 20mA (total)
  99. may safely be drawn from this line by expansion modules.
  100.  
  101. 0V (pins 7,8,47,48)     Ground.  Expansion modules with their own power
  102. supply must have the 0V lines commoned with the Electron.
  103.  
  104. +5V (pins 9,10,49,50)   A +5V supply from the Electron.  Up to 500mA (total)
  105. may safely be drawn from this line by expansion modules as long as no power
  106. is taken from 18V AC (pins 1,2,3,4).
  107.  
  108. SOUND O/P (pin 11)      Sound output.  A 3V peak to peak source via a 1K
  109. series resistor from the Electron ULA.
  110.  
  111. 16 MHz (pin 12)         16 Megahertz from the Electron main oscillator. 
  112. This output may be used for clock generation within an expansion module.
  113.  
  114. /13 IN (pin 13)         16 Megahertz divided by 13.  This output may be used
  115. for baud rate generation.  If divided by 1024 it will give approximately
  116. 1200Hz.
  117.  
  118. PHI OUT (pin 14)        The 6502 input clock.  The low time is nominally
  119. 250ns.  The high time may be 250ns (2MHz operation when reading ROMs) or
  120. 750ns or 1250ns (stretched clock for a 1MHz access, the length depending on
  121. the phase of the 2MHz clock) or up to 40us (if in modes 0-3).  For further
  122. details see Section 4.
  123.  
  124. RST (pin 15)            Reset (active low).  This is an OUTPUT ONLY for the
  125. system reset line.  It may be used to initialise expansion modules on power
  126. up and when the BREAK key is pressed.
  127.  
  128. NMI (pin 16)            Non-Maskable Interrupt (negative edge triggered). 
  129. This is the system NMI line which is open collector (wire-OR) and may be
  130. asserted by an expansion module.  The pull-up resistor on this line inside
  131. the ULA is 3k3.  Care must be taken to avoid masking other interrupts by
  132. holding the line low.  Using NMI on the Electron requires knowledge of
  133. operating system protocols.
  134.  
  135. IRQ (pin 17)            Interrupt Request (active low).  This is the system
  136. IRQ line which is open collector (wire-OR) and may be asserted by an
  137. expansion module.  The pull-up resistor on this line inside the ULA is 3k3. 
  138. It is essential for the correct operation of the machine that interrupts to
  139. not occur until the software is capable of dealing with them.  Interrupts on
  140. the Electron expansion bus should therefore be disabled on power-up and
  141. reset.  Significant use of interrupt service time may affect other machine
  142. functions, eg the real time clock.  For further details see Section 4.
  143.  
  144. R/W (pin 18)            The system read/write line from the 6502.
  145.  
  146. D7-D0 (pins 19-26)      Bi-directional data bus.  The direction of data is
  147. determined by R/W.
  148.  
  149. RDY (pin 27)            6502 ready line (active low).  May be asserted by an
  150. expansion module to stop the processor when reading slow memory.  This line
  151. works on read only (R/W=1).
  152.  
  153. (pin 28)                No connection
  154.  
  155. (pins 29,30)            Polarising key connector.
  156.  
  157. A0-A15 (pins 31-46)     6502 address bus.
  158.  
  159.  
  160.  
  161. 3.0  Power Supply
  162.  
  163. Electron power supply:
  164.  
  165. Note carefully:  instructions supplied with any expansion unit must state
  166. that all power supplied to the Electron and the expansion unit must be
  167. turned off before the expansion module is connected to or disconnected from
  168. the Electron.
  169.  
  170. The Electron power supply may be used to power expansion modules to a total
  171. of 500mA drawn from the +5V terminal on the expansion connector, and 20mA
  172. from the -5V terminal.  THESE ARE TOTAL FIGURES FOR ALL EXPANSION UNITS
  173. COMBINED.
  174.  
  175. The 18V AC terminals on the expansion connector may be used to drive a low
  176. voltage power supply in the expansion module, but the total power drawn from
  177. the Electron mains power adaptor must never exceed 14 watts (worst case). 
  178. If no power is being drawn by the expansion unit from the Electron's +5V
  179. supply then 6W may safely be drawn from the 18V AC lines on the expansion
  180. connector.  The thermal fuse in the mains power adaptor is blown
  181. irretrievably if these values are exceeded.
  182.  
  183. Expansion power supply:
  184.  
  185. To accommodate expansion modules and combinations of modules which require
  186. more current, a separate power supply must be used.  When this is done, the
  187. 0V rail of the expansion module must be connected to the 0V terminal of the
  188. Electron expansion connector.  The +5V rail and the -5V rail (if
  189. implemented) must remain isolated from the Electron.
  190.  
  191. On no account should an expansion module power supply be designated to drive
  192. the Electron's 18V AC lines.  This could create a conflict with the
  193. Electron's own AC supply, and would be extremely dangerous if the Electron's
  194. mains power transformer were plugged into the Electron when disconnected
  195. from the mains.
  196.  
  197.  
  198. 4.0  Timing
  199.  
  200. Processor Clock:
  201.  
  202. The Electron clock changes speed depending on what is being accessed at the
  203. time.
  204.  
  205. During accesses to the ROM the processor runs at 2MHz; PHI OUT is low for
  206. 250ns followed by high for 250ns (nominal).
  207.  
  208. During access to I/O and to RAM in modes 4-6 the processor runs at 1 MHz. 
  209. The transition from 2Mhz to 1MHz is accomplished by having PHI OUT low time
  210. of 250ns followed by a high time of either 750 or 1250ns depending on the
  211. phase of the 2MHz signal, see Figure 2.  The reason for this is that the
  212. processor will re-synchronise to the 1Mhz clock, making interfacing to
  213. peripherals such as the 6522 possible.  The 1MHz clock is not available
  214. outside the ULA; it must be generated externally.
  215.  
  216. (Fig.2)
  217.  
  218. In modes 0-3 the processor is denied access to the RAM during the displayed
  219. portion of the screen (40us out of 64us in 256 lines out of 312).  If the
  220. processor requires access to the RAM during this time it is forced to wait
  221. until the end of the 40us line display period.  ROM access during this time
  222. is allowed.  The effect of all this is that the processor clock may be
  223. stretched in the high state for a period of up to 40us.
  224.  
  225.  
  226. 4.1  Regeneration of PHI
  227.  
  228. The timing of signal supplied to the Electron expansion are 16MHz, PHI OUT
  229. (the processor input clock), and 16M/13 (for baud rate generation).  Signals
  230. such as 1MHz and 2MHz are used inside the ULA but do not exist outside. 
  231. Since, for example, the 6522 needs a 1MHz clock in phase with the processor
  232. clock, this must be generated externally, see Figure 3.
  233.  
  234.  
  235. 4.2  Interrupt Latency
  236.  
  237. The longest period for which interrupts (IRQs) are disabled determines the
  238. frequency at which new interrupts can be serviced.  When the Electron is in
  239. modes 0-3 this period (known as interrupt latency) can be as long as 10ms
  240. worst case.  This can cause problems for RS423, A/D conversion, etc.
  241.  
  242. In modes 4-6 the interrupt latency is 4ms worst case, so actions which
  243. require fast access or high data rate must force the Electron into one of
  244. these modes.
  245.  
  246. Use of an ACIA or UART with FIFO capability and/or a handshake will increase
  247. data throughput.
  248.  
  249.  
  250. 5.0  Sideways ROMs
  251.  
  252. Decoding:
  253.  
  254. Decoding of sideways ROMs is carried out at location &FE05.  Any expansion
  255. module which uses sideways ROMs must include circuitry to intercept the
  256. write to &FE05 and act appropriately.  The ULA handles the keyboard (ROM
  257. numbers 8 and 9) and BASIC (ROM numbers 10 and 11).  These four ROM numbers
  258. are decoded inside the Electron itself and are not available for use by an
  259. expansion module.  All other ROM calls must be decoded by the expansion
  260. module at address &FE05.
  261.  
  262. Twelve sideways ROMs can be accommodated on the Electron expansion, and four
  263. (ROM numbers 12 to 15) are accessible by a single write to &FE05.
  264.  
  265.                 D7      D6      D5      D4      D3      D2      D1      D0
  266. Write at &FE05  0       0       0       0       1       1       R1      R0
  267.  
  268. Where R1 R0 selects which of the four ROMs is required.  These four ROMs are numbered 12 to 15.
  269.  
  270. Selection of a ROM number 12 to 13 will take the following form:
  271.  
  272.         LDA#   ROMnumber
  273.         STA      &F4
  274.         STA      &Fe05
  275.  
  276. The write to &F4 must be carried out before the write to &FE05 in case an
  277. interrupt occurs.  The write to &FE05 tells the ULA that a sideways ROM is
  278. to be accessed and it passes control to the operating system.  Hardware in
  279. the expansion module must decode the write to &FE05 and select one of the
  280. four ROMs.
  281.  
  282. Now that BASIC has been de-selected, a further write to &FE05 can be decoded
  283. by the expansion module to select ROMs numbered from 0 to 7. 
  284.  
  285.                 D7      D6      D5      D4      D3      D2      D1      D0
  286. Write at &FE05  0       0       0       0       0       R2      R1      R0
  287.  
  288. where R2 R1 R0 select which of the eight ROMs is required.  These eight ROMs are numbered 0 to 7.
  289.  
  290. Once again, the write to &FE05 must be decoded by hardware in the expansion
  291. module which selects one of the eight ROMs.
  292.  
  293. Selection of a ROM number 0 to 7 will take the following form:
  294.  
  295.         LDA#      &0C      \to
  296.         STA       &F4      \deselect
  297.         STA       &FE05    \BASIC
  298.         LDA#      ROMnumber
  299.         STA       &F4
  300.         STA       &FE05
  301.  
  302. On power-up, sideways ROMs are polled in the order 15 through to 0 to find
  303. the first which is configured as a language ROM.  Execution will then
  304. commence in this ROM.  As BASIC is ROM number 10/11, a ROM in an expansion
  305. module which is required to power-up before BASIC must be numbered 12 to 15.
  306.  
  307. ROM number allocation:
  308.  
  309. ROM selected by one write to address &FE05 are numbered 12 to 15, specified
  310. by 1100, 1101, 1110, 1111 in D3 D2 D1 D0 respectively.  These ROMs are
  311. allocated to high priority NMI devices, or language which is to boot up
  312. before BASIC (eg a games cartridge).
  313.  
  314. ROMs selected by two writes to address &FE05 are numbered 0 to 7, specified
  315. by 0000, 0001, 0010, 0100, 0101, 0110, 0111 in D3 D2 D1 D0 respectively. 
  316. These ROMs are low priority.
  317.  
  318. Acorn Plus 1 priority is forced as follows, highest priority first:
  319.  
  320.         15 to 12
  321.         7 to   0
  322.         BASIC
  323.  
  324. This means that if sideways ROMs are used with the Plus 1 fitted then a
  325. language in 0 to 7 will power-up ahead of BASIC.
  326.  
  327. ROM number allocation is as follows:
  328.  
  329.         0,1     Second external socket on expansion module (SK2)
  330.         2,3     First external socket on expansion module (SK1)
  331.         4-6     User applications
  332.         7       Modem
  333.         8,9     Keyboard
  334.         10,11   BASIC
  335.         12      Expansion module operating system
  336.         13      High priority slot in expansion module
  337.         14      ECONET
  338.         15      Disc
  339.  
  340.  
  341. 6.0  Mechanical Constraints
  342.  
  343. Expansion modules must be designed to mate mechanically with the rear of the
  344. Electron (relevant dimensions are given in the Appendix).  Note that the
  345. case of any expansion module should have a protruding tongue which locates,
  346. with the clearance shown, into the cutout at the rear of the Electron.  This
  347. ensures that the connector cannot be inserted crookedly.  A simple connector
  348. without case location is not sufficient: if the connect is inserted
  349. crookedly while the power is on (in such a way as to short adjacent tracks),
  350. damage can be done to the Electron.  For secure attachment, modules should
  351. be supplied with captive screws which locate into recessed brass bosses at
  352. the rear of the Electron.
  353.  
  354.  
  355. 7.0  Compatibility with Acorn Expansion Modules
  356.  
  357. I/O space
  358.  
  359. Page &FC in memory is reserved for peripherals with small memory
  360. requirements.  Only one peripheral will be allocated to each group of
  361. addresses.  Use of any memory areas not designated for user applications may
  362. lead to conflict with expansion modules produced by Acorn.
  363.  
  364. Initial allocations of space are as follows:
  365.  
  366.         FC00 to FC0F            Test hardware
  367.         FC10 to FC13            TELETEXT
  368.         FC14 to FC1F            PRESTEL
  369.         FC20 to FC27            IEEE 488 Interface
  370.         FC28 to FC2F            ECONET
  371.         FC30 to FC3F            CAMBRIDGE RING interface
  372.         FC40 to FC37            WINCHESTER disc interface
  373.         FC48 to FC5F            Reserved for ACORN expansions
  374.         FC60 to FC6F            ACIA
  375.         FC70                    A to D conversion
  376.         FC71                    CENTRONICS
  377.         FC72                    Status register - BSY ADC FB2 FB1 x x x x
  378.                           FB1 - fire button 1
  379.                           FB2 - fire button 2
  380.                           ADC - end of A to D conversion
  381.                           BSY - printer busy
  382.                           x - undefined
  383.         FC73                    Sideways scrolled ROM control register
  384.         FC74 to FC7F            Reserved for ACORN expansions
  385.         FC80 to FC8F            Test hardware
  386.         FC90 to FC9F            Sound/speech
  387.         FCA0 to FCAF            Reserved for ACORN expansions
  388.         FCB0 to FCBF            VIA/real-time clock
  389.         FCD0 to FCDF            Floppy disc controller
  390.         FCE0 to FCEF            THE TUBE
  391.         FCF0 to FCFE            User applications
  392.         FCFF                    Paging register for JIM
  393.  
  394.  
  395.  
  396. ROM numbers:
  397.  
  398. Use of sideways ROM numbers other than those designated for user
  399. applications may cause conflict with expansion modules produced by Acorn. 
  400. Connection of two expansion modules which use the same ROM number will cause
  401. the system to crash and may result in damage to the expansion units or to
  402. the Electron.
  403.  
  404.  
  405. 7.1 BS 415
  406.  
  407. Any expansion module must meet BS 415 Class 1 specification for
  408. electrical safety.
  409.  
  410.  
  411. 7,2  Electron expansion middle module data buffer control
  412.  
  413. As two expansion modules can be used on the Electron simultaneously and in
  414. any order, there may be a conflict on the data bus during read cycles if
  415. buffers in a rear expansion unit are enabled when a peripheral device in a
  416. middle expansion unit is being accessed.  Also, data buffers in expansion
  417. units must never be enabled when the Electron's own internal ROMs (8 to 11)
  418. are being accessed.
  419.  
  420. To prevent these collisions, a buffer enable line has been allocated through
  421. which an expansion module will enable the data buffers of the expansion
  422. module behind it when required.  As Acorn have allocated the spare pin on
  423. the expansion connector (pin 28) to  SOUND IN, pin 27 (the RDY line on the
  424. expansion connector) has been chosen to fulfil this buffer enable function
  425. in middle expansion modules.
  426.  
  427.  
  428.  
  429. APPENDIX
  430.  
  431.  
  432. Figure 5 : Case dimensions around Electron expansion connector
  433.  
  434. Figure 6 : Fixing hole gauge M6
  435.  
  436.         
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.